package com.qwc.blog.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author qwc
 * @Date 2021/10/26 9:21
 */
@Data
@Component
@ConfigurationProperties(prefix = "qblog")
public class QblogProperties {
    private String name;
    private String version;
    private static String profile;
    private String avatar;
    private String picture;
    private String fileUrl;

    public void setProfile(String profile) {
        QblogProperties.profile = profile;
    }

    public String getAvatarPath() {
        return profile + avatar;
    }

    public String getPicturePath() {
        return profile + picture;
    }

    public static String getProfile() {
        return profile;
    }
}
